﻿@{
    ViewBag.Title = "Index";
    Layout = null;
}

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>登录</title>
<link href="@Url.Content("~/Areas/admin/css/login.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/js/jquery.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/jquery.validate.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/jquery.form.js")" type="text/javascript"></script>
<script language="JavaScript">
<!--
    if (self != top) top.location.href = window.location.href;
//-->
</script>
</head>
<body>
<form id="form1" action="@Url.Action("dologin","Login")" method="post">
  
    <table width="100%">
        
        <tr>
            <td class="tdlabel">用户名：</td>
            <td><input type="text" id="account" name="userName"/></td>
        </tr>
        
        <tr>
            <td class="tdlabel">密码：</td>
            <td><input type="password" id="password" name="password"/></td>
        </tr>
        
        <tr>
            <td></td>
            <td>
                 <input type="submit" style=" margin-top: 10px; float: left; " class="button" name="submit" value="登 录"/>
                 <div class="msg"><div id="result" class="result none"></div></div>
            </td>
        </tr>
        
    </table>

</form>

    
<script language="JavaScript">
    jQuery(document).ready(function ($) {
        $('#form1').ajaxForm({
            beforeSend: function () {
                $('#result').html('<img src="/Areas/admin/ico/ajaxloading.gif">');
            },
            success: complete,
            dataType: 'json'
        });

    });
    function complete(data) {
        if (data.status == 1) {
            $('#result').html(data.info).show();
            setTimeout(function () { window.location.href = ' @Url.Action("index","Index")'; }, 500)
        } else {
            $('#result').html(data.info).show();
        }
    }

    function reload() {
        document.login.username.focus();
        if (self != top) {
            window.top.location.href = ' @Url.Action("index","Login")';
        }
    }

</script>

 </body>

 </html>